<template>
	<view class="body">
		<u-navbar :title="article.title" :title-bold="true" title-color="#000" :border-bottom="false" custom-class="home-bg" :background="{ background: 'transparent' }"></u-navbar>

		<view class="rich">
			<rich-text :nodes="article.content"></rich-text>
		</view>
	</view>
</template>

<script>
import user from '@/api/user';

export default {
	data() {
		return {
			article: {}
		};
	},
	onLoad(o) {
		if (o.type == 0) {
			this.getArticle(24);
		} else if (o.type == 1) {
			this.getArticle(25);
		}
	},
	methods: {
		getArticle(row) {
			user.getArticle(row).then((res) => {
				this.article = res.data;
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.body {
	width: 100%;
	min-height: 100vh;
	background-color: #fff;
}
.rich {
	margin: 30rpx;
}
</style>
